How to load Excel template for exporting to excel

Hello,

Is there a way to load excel template. Ineed to name use specific template to export to. How can this be done.

 tried adding

         clear args
         // Change the path according to your path settings.
         put(args, "rtm.xlt")
but did not work

Thanks

Jester


jester76 - Mon Oct 14 06:18:48 EDT 2013

Re: How to load Excel template for exporting to excel
charles.easter - Fri Nov 15 09:40:26 EST 2013

I also would like to export a doors module to an Excel template. Any help with this will be appreciated.

Thanks,

Charles

Re: How to load Excel template for exporting to excel
llandale - Tue Nov 19 13:04:48 EST 2013

charles.easter - Fri Nov 15 09:40:26 EST 2013

I also would like to export a doors module to an Excel template. Any help with this will be appreciated.

Thanks,

Charles

Not very familiar, but I would consider opening a particular excel file (your template), commanding excel to Save-As, then populate it, then Save.

Re: How to load Excel template for exporting to excel
charles.easter - Wed Nov 20 11:05:27 EST 2013

llandale - Tue Nov 19 13:04:48 EST 2013

Not very familiar, but I would consider opening a particular excel file (your template), commanding excel to Save-As, then populate it, then Save.

Thanks llandale.

Specifically, what I'm trying to do is get DOORS to export directly to the Excel template. DOORS has this capability for Word, and I'm looking to do something similar for Excel.

Re: How to load Excel template for exporting to excel
HazelWoodcock - Wed Nov 20 11:48:02 EST 2013

charles.easter - Wed Nov 20 11:05:27 EST 2013

Thanks llandale.

Specifically, what I'm trying to do is get DOORS to export directly to the Excel template. DOORS has this capability for Word, and I'm looking to do something similar for Excel.

DOORS has no inbuilt menu option to export to Excel.  You can export to a spreadsheet, either tsv or csv and then open that file with Excel and work whatever template magic you have.

Re: How to load Excel template for exporting to excel
Mathias Mamsch - Wed Nov 20 12:10:04 EST 2013

charles.easter - Fri Nov 15 09:40:26 EST 2013

I also would like to export a doors module to an Excel template. Any help with this will be appreciated.

Thanks,

Charles

Some old code says:

    OleAutoObj wbs = null;
    oleGet(objExcel, "Workbooks", wbs)
    if (null wbs) error "Could not get Workbooks Collection of Excel instance. "
    OleAutoArgs args = create();
    put(args, templatePath);
    OleAutoObj objWorkbook = null;  
    oleMethod(wbs, "Add", args, objWorkbook) // open from template
    // oleMethod  (wbs, "Open", args, objWorkbook)  // open existing Excel File

It was encapsuled in some other syntax because of OLE helper functions, so it can be that it has some syntax errors (I did not check), but I think it might give you a start. Regards, Mathias

Re: How to load Excel template for exporting to excel
M_vdLaan - Thu Nov 28 10:26:45 EST 2013

Just wondering what the required approach would be. Are thinking along the lines of:

  1. Load a template
  2. Read the first row of cells on the first sheet and match the values to object attributes
  3. For each object in the module/view:
    1. Create a new row
    2. Copy the attributes to the corresponding columns of the row

I think that you will face issues when coming across OLE object (e.g. pictures) within rich text fields. Other than that, this should be 'doable' with the OleAutoObj interface. I might have a stab at it at some point. Sounds like a useful utility.

BTW, you know the scripts over at Galactic Solutions Corporation? They have an Advanced Export to Excel script you can download. A while since I've seen/used it, though. Check it out.

Good luck!